import request from '@/utils/request';

/** 查询杂项开支列表 */
export const getMiscellaneousExpensesListApi = (data: any) => {
    return request({
        url: '/system/miscellaneousExpenses/list',
        method: 'post',
        data: data
    });
};

/** 新增杂项开支 */
export const addMiscellaneousExpensesApi = (data: any) => {
    return request({
        url: '/system/miscellaneousExpenses',
        method: 'post',
        data: data
    });
};

/** 查看凭证 */
export const getMiscellaneousExpensesPictureApi = (id: any) => {
    return request({
        url: '/system/miscellaneousExpenses/getFileUrls',
        method: 'get',
        params: {id}
    });
};

/** 审批 0未审核 1：通过 2拒绝 */
export const auditMiscellaneousExpensesApi = (data: any) => {
    return request({
        url: '/system/miscellaneousExpenses/approval',
        method: 'put',
        params: data
    });
};

/** 申请对账 */
export const applyReconciliationApi = (data: any) => {
    return request({
        url: '/system/miscellaneousExpenses/reconciliation',
        method: 'put',
        data: data
    });
};

/** 删除杂项开支 */
export const deleteMiscellaneousExpensesApi = (id: any) => {
    return request({
        url: `/system/miscellaneousExpenses/${id}`,
        method: 'delete',
    });
};